package com.ssm.helong.shop.controller;

import com.ssm.helong.shop.entity.GoodsTopFloor;
import com.ssm.helong.shop.pojo.FindAllGoods;
import com.ssm.helong.shop.service.GoodsService;
import com.ssm.helong.shop.service.ShoppingCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Objects;

@Controller
@RequestMapping("/goods")
public class GoodsController {
    @Autowired
    private GoodsService goodsService;

    @RequestMapping("findallgoods")
    public String FindAllGoods(FindAllGoods findAllGoods) {
        List <FindAllGoods> a = goodsService.findAllGoods(findAllGoods);
        System.out.println("所有商品信息" + a);
        return "findAllGoods";
    }

    @RequestMapping("selectTopShops")
    public String selectTopShops(GoodsTopFloor goodsTopFloor) {
        List a = goodsService.selectTopShops(goodsTopFloor);
        System.out.println("商品分类导航大类" + a);
        return "";
    }

    @RequestMapping("selectGoodsShops")
    public String selectGoodsShops(String  goodsFirstName) {
        List a = goodsService.selectGoodsShops(goodsFirstName);
        System.out.println("商品分类导航子类" + a);

        return "";
    }

    @RequestMapping("selectGoodsShopsAttribute")
    public String  selectGoodsShopsAttribute(String goodsName){
        List a =goodsService.selectGoodsShopsAttribute(goodsName);
        System.out.println("商品分类导航字类属性"+a);
        return "";
    }
}
